function showLoading(title) {
	uni.showLoading({
		title: title ? title : '正在加载...',
		mask: true
	})
}

function hideLoading() {
	uni.hideLoading()
}


function showErrorDialog(message) {
	uni.showModal({
		title: '错误',
		content: message ? message : '错误',
		showCancel: false,
		confirmText: '确定',
		confirmColor: '#e64340'
	});
}

/**
 * 获取本地token
 */
function getToken(){
	return uni.getStorageSync('Authorization')
}

export default {
	showLoading,
	hideLoading,
	showErrorDialog,
	getToken
}
